{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "shaped-colombia",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "68对应的字母是：D\n",
      "F的ASCII码为：70\n",
      "33 - ! 34 - \" 35 - # 36 - $ 37 - % 38 - & 39 - ' 40 - ( \n",
      "\n",
      "41 - ) 42 - * 43 - + 44 - , 45 - - 46 - . 47 - / 48 - 0 \n",
      "\n",
      "49 - 1 50 - 2 51 - 3 52 - 4 53 - 5 54 - 6 55 - 7 56 - 8 \n",
      "\n",
      "57 - 9 58 - : 59 - ; 60 - < 61 - = 62 - > 63 - ? 64 - @ \n",
      "\n",
      "65 - A 66 - B 67 - C 68 - D 69 - E 70 - F 71 - G 72 - H \n",
      "\n",
      "73 - I 74 - J 75 - K 76 - L 77 - M 78 - N 79 - O 80 - P \n",
      "\n",
      "81 - Q 82 - R 83 - S 84 - T 85 - U 86 - V 87 - W 88 - X \n",
      "\n",
      "89 - Y 90 - Z 91 - [ 92 - \\ 93 - ] 94 - ^ 95 - _ 96 - ` \n",
      "\n",
      "97 - a 98 - b 99 - c 100 - d "
     ]
    }
   ],
   "source": [
    "#题目一函数\n",
    "def trans(a):\n",
    "    print(f\"{a}对应的字母是：{chr(a)}\")\n",
    "def trans_back(b):\n",
    "    print(f\"{b}的ASCII码为：{ord(b)}\")\n",
    "#题目二函数\n",
    "def print_letters():\n",
    "    i = 0\n",
    "    for j in range(33,101):\n",
    "        print(j,\"-\",chr(j), end=\" \")\n",
    "        i = i + 1\n",
    "        if i % 8 == 0:\n",
    "            print('\\n')\n",
    "            \n",
    "trans(68)\n",
    "trans_back(\"F\")\n",
    "print_letters()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "serious-martin",
   "metadata": {},
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "fitted-cisco",
   "metadata": {},
   "outputs": [],
   "source": [
    "def cal(a,b):\n",
    "    print(f\"{a}*{b}={a*b}\", end = \" \")\n",
    "\n",
    "\n",
    "for i in range (1,10):\n",
    "    for k in range(1,10-i):\n",
    "        print(\"   \", end=\"\")\n",
    "    for j in range(1,i+1):\n",
    "        cal(i,j)\n",
    "    print(\" \")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
